<?php 
use yii\helpers\Html;
use yii\widgets\LinkPager;
use yii\helpers\Url;
use yii\bootstrap\ActiveForm;
?>
<div class="row">
    <div class="container lh30">
        <a class="topNav" href="<?=Url::toRoute('/system/site/index')?>"><img src="<?=Yii::getAlias('@web/backend/img/home/home.png');?>" alt="首页"/>返回首页</a>
    </div>
</div>

<div class="row nav-brand-bg">
    <div class="container lh30">
        <ul class="nav nav-tabs">
            <li class="active"><a href="" style="color: #575757;">权限管理</a></li>
        </ul>
    </div>
</div>


<div class="container">
    <div>
        <em>角色:</em><em><?=Html::encode($role['name'])?></em>
    </div>
    <div>
        <em>权限:</em>
        <?php $form=ActiveForm::begin(['id'=>'myform']);?>
        <input type="hidden" name="role_id" value="<?=$role['id'] ?>"/>
        <table class="table table-bordered">
            <tbody>
            <?php foreach ($menuParent as $p) {?>
            <tr>
                <td colspan="2">
                    <div style="width:30px;float: left;"><input style="margin: 0px;display: -moz-stack;" type="checkbox" name="menu[]" id="menu" value="<?=$p['id'] ?>" <?php if(in_array($p['id'], $menuIds)){?>checked="checked"<?php }?> style="display: block;"/></div>
                    <div><?=$p['titile'] ?></div>
                </td>
            </tr>
           <?php }?>
           <tr>
            <td><input type="submit" value="保存" class="sub" /></td>
            <td><input type="reset" value="取消" class="sub" /></td>
           </tr>
        </tbody>
        </table>
        <?php ActiveForm::end();?>
    </div>
</div>
